import type { EChartsOption } from 'echarts'

export function getOption(): EChartsOption {
  return  {
    grid: {
      left: '0%',
      right: '0%',
      bottom: '0%',
      top: '5%',
      containLabel: true,
    },
    xAxis: {
      type: 'value',
      max:500,
      show: false,
      axisLine :{
        show:false
      },
      // 不显示刻度线
      axisTick:{
        show:false,
      },
      splitLine:{// 网格线为虚线
        show:false,
      },
    },
    yAxis: {
      type: 'category',
      inverse: true,
      splitLine: {
        show: false,
      },
      axisTick: {
        show: false,
      },
      axisLine: {
        show: false,
      },
      axisLabel: {
        interval: 0,
        color:'rgba(255, 255, 255, 1)',
        fontSize: 14
      },
      data: [ '利润', '税收','主营业务收入','工业增加值','工业总产值',],
    },
    series: [
      {
        type: 'bar',
        barWidth: 12,
        barGap: '-150%',
        itemStyle: {
          borderRadius: [0, 6, 6, 0],
          color: {
            type: 'linear',
            x: 0,
            y: 0,
            x2: 1,
            y2: 1,
            colorStops: [{
              offset: 0, color: '#3B2667'
            }, {
              offset: 1, color: '#e8ba48'
            }]
          }
        },
        data: [460, 403, 355, 200, 50],
        label: {
          show: true,
          position: "right",
          color: "#e8ba48",
        },
      },
    ],
  };
}
